package com.stationbuilding.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;

public class SelectTreeBean implements Parcelable {
    /**
     * id
     */
    private String id;
    /**
     * name
     */
    private String name;
    /**
     * totalLevel
     */
    private Integer totalLevel;
    /**
     * score
     */
    private Integer maxScore;
    /**
     * score
     */
    private Integer minScore;
    /**
     * score
     */
    private Integer score;
    /**
     * measures
     */
    private String measures;
    /**
     * childList
     */
    private ArrayList<SelectTreeBean> childList;

    public SelectTreeBean() {
    }

    protected SelectTreeBean(Parcel in) {
        id = in.readString();
        name = in.readString();
        totalLevel = in.readInt();
        maxScore = in.readInt();
        minScore = in.readInt();
        score = in.readInt();
        measures = in.readString();
        childList = in.createTypedArrayList(SelectTreeBean.CREATOR);
    }

    public static final Creator<SelectTreeBean> CREATOR = new Creator<SelectTreeBean>() {
        @Override
        public SelectTreeBean createFromParcel(Parcel in) {
            return new SelectTreeBean(in);
        }

        @Override
        public SelectTreeBean[] newArray(int size) {
            return new SelectTreeBean[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getTotalLevel() {
        return totalLevel;
    }

    public void setTotalLevel(Integer totalLevel) {
        this.totalLevel = totalLevel;
    }

    public Integer getMaxScore() {
        return maxScore;
    }

    public void setMaxScore(Integer maxScore) {
        this.maxScore = maxScore;
    }

    public Integer getMinScore() {
        return minScore;
    }

    public void setMinScore(Integer minScore) {
        this.minScore = minScore;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    public String getMeasures() {
        return measures;
    }

    public void setMeasures(String measures) {
        this.measures = measures;
    }

    public ArrayList<SelectTreeBean> getChildList() {
        return childList;
    }

    public void setChildList(ArrayList<SelectTreeBean> childList) {
        this.childList = childList;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(name);
        dest.writeInt(totalLevel);
        dest.writeInt(maxScore);
        dest.writeInt(minScore);
        dest.writeInt(score);
        dest.writeString(measures);
        dest.writeTypedList(childList);
    }
}
